import Vue from 'vue'
import App from './App'
import router from './router'
//导入elementUI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//导入全局样式表
import './assets/css/global.css'
import axios from 'axios'
import global from './Global'
//粒子背景
import VueParticles from 'vue-particles'
Vue.use(VueParticles)
import dataV from '@jiaminghi/data-view';
Vue.use(dataV);


import less from 'less'
Vue.use(less)
//引入iviewUI
import ViewUI from 'view-design';
import 'view-design/dist/styles/iview.css';
import './my-theme/index.less';
Vue.use(ViewUI);

//引入适配，以及全局scss配置
import './assets/flexible.js';
import './assets/css/scss/style.scss'

//引入leaflet
import 'leaflet/dist/leaflet.css'
import '@supermap/iclient-leaflet'
import 'leaflet/dist/leaflet'

import 'jquery'

// import VueClipboard from 'vue-clipboard2'
// Vue.use(VueClipboard)
//在main.js引入qs
import qs from 'qs'

//配全局属性配置，在任意组件内可以使用this.$qs获取qs对象

Vue.prototype.$qs = qs

Vue.config.productionTip = false;

Vue.prototype.global = global;
//配置请求的根路径
// axios.defaults.baseURL = 'http://222.20.82.198:9090';
// axios.defaults.timeout = 5000;
axios.interceptors.request.use(config =>{
  //  console.log(config);
   config.headers.Authorization = window.sessionStorage.getItem('token');
   return config
 });
//Vue.prototype.$http = axios;

Vue.use(router);
Vue.use(ElementUI);

new Vue({
  el: '#app',
  router,
  render: h => h(App)
});
